﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace PSE.ProcessManager.Server.Process.Configuration
{
    [ConfigurationCollection(typeof(ProcessConfigurationElement), AddItemName = "add")]
    public class ProcessConfigurationElementCollection : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new ProcessConfigurationElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((ProcessConfigurationElement)element).Key;
        }

        public ProcessConfigurationElement this[int index]
        {
            get
            {
                return (ProcessConfigurationElement)BaseGet(index);
            }
        }

        public new ProcessConfigurationElement this[string name]
        {
            get
            {
                return (ProcessConfigurationElement)BaseGet(name);
            }
        }
    }
}
